﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DotSpatial.Topology;
using DotSpatial.Symbology;
using DotSpatial.Data;

namespace HAGISV2
{
    [Serializable]
    public class GridDataEntities:SingleBaseLayer
    {
        public GridDataEntities(string id)
            : base(id)
        {
            _featureType = FeatureType.Point;
            _ptLayers = new Dictionary<string, GridSourceSinksLayer>();
            
        }
        [NonSerialized]
        Dictionary<string,GridSourceSinksLayer> _ptLayers;

        public Dictionary<string, GridSourceSinksLayer> PtLayers
        {
            get { return _ptLayers; }
        }

        public void AddLayer(string id,GridSourceSinksLayer layer)
        {
            if (_ptLayers.ContainsKey(id)) throw new Exception("图层已存在该名称，请更换名字");
            _ptLayers.Add(id, layer);
            
        }

        public void RemoveLayer(string id)
        {
            if (_ptLayers.ContainsKey(id)) _ptLayers.Remove(id);
        }

        public void ClearLayer()
        {
            
        }


    }
}
